/*
 * @Description: 
 * @Autor: fage
 * @Date: 2022-06-06 14:02:56
 * @LastEditors: lanmeng656 cbf0311@sina.com
 * @LastEditTime: 2022-11-17 16:23:13
 */
"use strict";
const session = require("express-session");
// let FileStore = require("session-file-store")(session);
// const store = new FileStore({
//   ttl: 80000,
//   // path:'',
// });

module.exports = function () {
  return session({
    secret: "esa!@#$%%",
    name: "tmx", //这里的name值得是cookie的name，默认cookie的name是：connect.sid
    // store: store,
    cookie: { maxAge: 80000000 }, //设置maxAge是80000ms，即80s后session和相应的cookie失效过期
    resave: false,
    saveUninitialized: false,
  });
};
